public class Trucks extends Car
{
	public String carClass()
	{
		return "卡车";
	}
	public void run()
	{
		System.out.println("卡车");
	}
	public static void main(String[] args)
	{
		Car c1 = new Trucks();
		Car c2 = new Sedan();
		Car c3 = new Tractor();
		System.out.println("-----------------这里用的返回值方法--------------------");
		System.out.println(c1.carClass());
		System.out.println(c2.carClass());
		System.out.println(c3.carClass());
		System.out.println("-----------------这里用的run()方法---------------------");
		c1.run();
		c2.run();
		c3.run();
	}
}